# ggfortify

library(ggfortify)

# PCA
df <- iris[, 1:4]
autoplot(prcomp(df))

autoplot(prcomp(df), data = iris, colour = "Species")

autoplot(prcomp(df), data = iris, colour = "Species",
         label = TRUE, label.size = 3)


autoplot(prcomp(df), data = iris, colour = "Species",
         shape = FALSE, label.size = 3)

autoplot(prcomp(df), data = iris, colour = "Species",
         loadings = TRUE)

autoplot(prcomp(df), data = iris, colour = "Species",
         loadings = TRUE, loadings.colour = "blue",
         loadings.label = TRUE, loadings.label.size = 3)



